/**
 *
 */
import Util;
import OpenApi;

import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  
  @endpointMap = {
    ap-northeast-1 = 'reidcloud.aliyuncs.com',
    ap-northeast-2-pop = 'reidcloud.aliyuncs.com',
    ap-south-1 = 'reidcloud.aliyuncs.com',
    ap-southeast-1 = 'reidcloud.aliyuncs.com',
    ap-southeast-2 = 'reidcloud.aliyuncs.com',
    ap-southeast-3 = 'reidcloud.aliyuncs.com',
    ap-southeast-5 = 'reidcloud.aliyuncs.com',
    cn-beijing = 'reidcloud.aliyuncs.com',
    cn-beijing-finance-1 = 'reidcloud.aliyuncs.com',
    cn-beijing-finance-pop = 'reidcloud.aliyuncs.com',
    cn-beijing-gov-1 = 'reidcloud.aliyuncs.com',
    cn-beijing-nu16-b01 = 'reidcloud.aliyuncs.com',
    cn-chengdu = 'reidcloud.aliyuncs.com',
    cn-edge-1 = 'reidcloud.aliyuncs.com',
    cn-fujian = 'reidcloud.aliyuncs.com',
    cn-haidian-cm12-c01 = 'reidcloud.aliyuncs.com',
    cn-hangzhou = 'reidcloud.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'reidcloud.aliyuncs.com',
    cn-hangzhou-finance = 'reidcloud.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'reidcloud.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'reidcloud.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'reidcloud.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'reidcloud.aliyuncs.com',
    cn-hangzhou-test-306 = 'reidcloud.aliyuncs.com',
    cn-hongkong = 'reidcloud.aliyuncs.com',
    cn-hongkong-finance-pop = 'reidcloud.aliyuncs.com',
    cn-huhehaote = 'reidcloud.aliyuncs.com',
    cn-huhehaote-nebula-1 = 'reidcloud.aliyuncs.com',
    cn-north-2-gov-1 = 'reidcloud.aliyuncs.com',
    cn-qingdao = 'reidcloud.aliyuncs.com',
    cn-qingdao-nebula = 'reidcloud.aliyuncs.com',
    cn-shanghai = 'reidcloud.cn-shanghai.aliyuncs.com',
    cn-shanghai-et15-b01 = 'reidcloud.aliyuncs.com',
    cn-shanghai-et2-b01 = 'reidcloud.aliyuncs.com',
    cn-shanghai-finance-1 = 'reidcloud.aliyuncs.com',
    cn-shanghai-inner = 'reidcloud.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'reidcloud.aliyuncs.com',
    cn-shenzhen = 'reidcloud.aliyuncs.com',
    cn-shenzhen-finance-1 = 'reidcloud.aliyuncs.com',
    cn-shenzhen-inner = 'reidcloud.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'reidcloud.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'reidcloud.aliyuncs.com',
    cn-wuhan = 'reidcloud.aliyuncs.com',
    cn-wulanchabu = 'reidcloud.aliyuncs.com',
    cn-yushanfang = 'reidcloud.aliyuncs.com',
    cn-zhangbei = 'reidcloud.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'reidcloud.aliyuncs.com',
    cn-zhangjiakou = 'reidcloud.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'reidcloud.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'reidcloud.aliyuncs.com',
    eu-central-1 = 'reidcloud.aliyuncs.com',
    eu-west-1 = 'reidcloud.aliyuncs.com',
    eu-west-1-oxs = 'reidcloud.aliyuncs.com',
    me-east-1 = 'reidcloud.aliyuncs.com',
    rus-west-1-pop = 'reidcloud.aliyuncs.com',
    us-east-1 = 'reidcloud.aliyuncs.com',
    us-west-1 = 'reidcloud.aliyuncs.com',
  };
  checkConfig(config);
  @endpoint = getEndpoint('reid_cloud', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model DescribeBaseStatisticsRequest {
  date?: string(name='Date'),
  summaryType?: string(name='SummaryType'),
  extraStatisticTypes?: string(name='ExtraStatisticTypes'),
  storeId?: long(name='StoreId'),
  locationId?: long(name='LocationId'),
}

model DescribeBaseStatisticsResponseBody = {
  requestId?: string(name='RequestId'),
  cursorTime?: string(name='CursorTime'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  baseStatistics?: {
    baseStatistics?: [ 
    {
      stayPeriod?: long(name='StayPeriod'),
      maleAgeItems?: {
        ageItem?: [ 
        {
          name?: string(name='Name'),
          count?: int32(name='Count'),
        }
      ](name='AgeItem')
      }(name='MaleAgeItems'),
      stayDistributionItems?: {
        stayDistributionItem?: [ 
        {
          startTs?: long(name='StartTs'),
          count?: int32(name='Count'),
          endTs?: long(name='EndTs'),
        }
      ](name='StayDistributionItem')
      }(name='StayDistributionItems'),
      onlyBodyUvCount?: int32(name='OnlyBodyUvCount'),
      time?: string(name='Time'),
      uvCount?: int32(name='UvCount'),
      maleUvCount?: int32(name='MaleUvCount'),
      summaryType?: string(name='SummaryType'),
      femaleUvCount?: int32(name='FemaleUvCount'),
      storeId?: long(name='StoreId'),
      oldCount?: int32(name='OldCount'),
      locationId?: long(name='LocationId'),
      ageItems?: {
        ageItem?: [ 
        {
          name?: string(name='Name'),
          count?: int32(name='Count'),
        }
      ](name='AgeItem')
      }(name='AgeItems'),
      newCount?: int32(name='NewCount'),
      femaleAgeItems?: {
        ageItem?: [ 
        {
          name?: string(name='Name'),
          count?: int32(name='Count'),
        }
      ](name='AgeItem')
      }(name='FemaleAgeItems'),
    }
  ](name='BaseStatistics')
  }(name='BaseStatistics'),
  success?: boolean(name='Success'),
}

model DescribeBaseStatisticsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeBaseStatisticsResponseBody(name='body'),
}

async function describeBaseStatisticsWithOptions(request: DescribeBaseStatisticsRequest, runtime: Util.RuntimeOptions): DescribeBaseStatisticsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeBaseStatistics', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeBaseStatistics(request: DescribeBaseStatisticsRequest): DescribeBaseStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBaseStatisticsWithOptions(request, runtime);
}

model DescribeCameraStatisticsRequest {
  startTimestamp?: long(name='StartTimestamp'),
  endTimestamp?: long(name='EndTimestamp'),
  storeId?: long(name='StoreId'),
  locationId?: long(name='LocationId'),
}

model DescribeCameraStatisticsResponseBody = {
  pvStatisticResults?: {
    pvStatisticResult?: [ 
    {
      processCursor?: long(name='ProcessCursor'),
      ipcId?: long(name='IpcId'),
      locationId?: long(name='LocationId'),
      pvType?: string(name='PvType'),
      maxDataTime?: long(name='MaxDataTime'),
      pvCount?: long(name='PvCount'),
      pvRects?: {
        rect?: [ 
        {
          right?: float(name='Right'),
          top?: float(name='Top'),
          left?: float(name='Left'),
          bottom?: float(name='Bottom'),
        }
      ](name='Rect')
      }(name='PvRects'),
    }
  ](name='PvStatisticResult')
  }(name='PvStatisticResults'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model DescribeCameraStatisticsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeCameraStatisticsResponseBody(name='body'),
}

async function describeCameraStatisticsWithOptions(request: DescribeCameraStatisticsRequest, runtime: Util.RuntimeOptions): DescribeCameraStatisticsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeCameraStatistics', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeCameraStatistics(request: DescribeCameraStatisticsRequest): DescribeCameraStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCameraStatisticsWithOptions(request, runtime);
}

model DescribeCursorRequest {
  partitionIndex?: int32(name='PartitionIndex'),
  storeId?: long(name='StoreId'),
  time?: string(name='Time'),
}

model DescribeCursorResponseBody = {
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  cursor?: string(name='Cursor'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model DescribeCursorResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeCursorResponseBody(name='body'),
}

async function describeCursorWithOptions(request: DescribeCursorRequest, runtime: Util.RuntimeOptions): DescribeCursorResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeCursor', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeCursor(request: DescribeCursorRequest): DescribeCursorResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCursorWithOptions(request, runtime);
}

model DescribeCustomerFlowByLocationRequest {
  startDate?: string(name='StartDate'),
  minCount?: long(name='MinCount'),
  parentAmount?: long(name='ParentAmount'),
  storeId?: long(name='StoreId'),
  parentLocationIds?: string(name='ParentLocationIds'),
  locationId?: long(name='LocationId'),
  endDate?: string(name='EndDate'),
  maxCount?: long(name='MaxCount'),
}

model DescribeCustomerFlowByLocationResponseBody = {
  customerFlowItems?: {
    customerFlowItem?: [ 
    {
      storeId?: long(name='StoreId'),
      parentLocationIds?: string(name='ParentLocationIds'),
      percent?: float(name='Percent'),
      locationId?: long(name='LocationId'),
      locationName?: string(name='LocationName'),
      count?: long(name='Count'),
    }
  ](name='CustomerFlowItem')
  }(name='CustomerFlowItems'),
  storeId?: long(name='StoreId'),
  requestId?: string(name='RequestId'),
  percent?: float(name='Percent'),
  parentLocationIds?: string(name='ParentLocationIds'),
  locationId?: long(name='LocationId'),
  errorCode?: string(name='ErrorCode'),
  count?: long(name='Count'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
  locationName?: string(name='LocationName'),
}

model DescribeCustomerFlowByLocationResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeCustomerFlowByLocationResponseBody(name='body'),
}

async function describeCustomerFlowByLocationWithOptions(request: DescribeCustomerFlowByLocationRequest, runtime: Util.RuntimeOptions): DescribeCustomerFlowByLocationResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeCustomerFlowByLocation', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeCustomerFlowByLocation(request: DescribeCustomerFlowByLocationRequest): DescribeCustomerFlowByLocationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCustomerFlowByLocationWithOptions(request, runtime);
}

model DescribeDevicesRequest {
  storeId?: long(name='StoreId'),
}

model DescribeDevicesResponseBody = {
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  devices?: {
    device?: [ 
    {
      ipcId?: long(name='IpcId'),
      ipcName?: string(name='IpcName'),
      ipcStatus?: string(name='IpcStatus'),
      agentMac?: string(name='AgentMac'),
      ipcIp?: string(name='IpcIp'),
      agentReceiveTime?: long(name='AgentReceiveTime'),
      ipcReceiveTime?: long(name='IpcReceiveTime'),
      agentIp?: string(name='AgentIp'),
      agentStatus?: string(name='AgentStatus'),
    }
  ](name='Device')
  }(name='Devices'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model DescribeDevicesResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDevicesResponseBody(name='body'),
}

async function describeDevicesWithOptions(request: DescribeDevicesRequest, runtime: Util.RuntimeOptions): DescribeDevicesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDevices', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDevices(request: DescribeDevicesRequest): DescribeDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDevicesWithOptions(request, runtime);
}

model DescribeHeatMapRequest {
  emapId?: long(name='EmapId'),
  storeId?: long(name='StoreId'),
  date?: string(name='Date'),
}

model DescribeHeatMapResponseBody = {
  requestId?: string(name='RequestId'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
  heatMapPoints?: {
    heatMapPoint?: [ 
    {
      weight?: int32(name='Weight'),
      y?: float(name='Y'),
      x?: float(name='X'),
    }
  ](name='HeatMapPoint')
  }(name='HeatMapPoints'),
}

model DescribeHeatMapResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeHeatMapResponseBody(name='body'),
}

async function describeHeatMapWithOptions(request: DescribeHeatMapRequest, runtime: Util.RuntimeOptions): DescribeHeatMapResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeHeatMap', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeHeatMap(request: DescribeHeatMapRequest): DescribeHeatMapResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHeatMapWithOptions(request, runtime);
}

model DescribeImageUrlsRequest {
  originUrls?: string(name='OriginUrls'),
  objectKeys?: string(name='ObjectKeys'),
  storeId?: long(name='StoreId'),
}

model DescribeImageUrlsResponseBody = {
  requestId?: string(name='RequestId'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  urls?: {
    imageUrl?: [ 
    {
      objectKey?: string(name='ObjectKey'),
      url?: string(name='Url'),
    }
  ](name='ImageUrl')
  }(name='Urls'),
  success?: boolean(name='Success'),
}

model DescribeImageUrlsResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeImageUrlsResponseBody(name='body'),
}

async function describeImageUrlsWithOptions(request: DescribeImageUrlsRequest, runtime: Util.RuntimeOptions): DescribeImageUrlsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeImageUrls', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeImageUrls(request: DescribeImageUrlsRequest): DescribeImageUrlsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeImageUrlsWithOptions(request, runtime);
}

model DescribeIpcLiveAddressRequest {
  ipcId?: long(name='IpcId'),
  storeId?: long(name='StoreId'),
  protocolType?: string(name='ProtocolType'),
}

model DescribeIpcLiveAddressResponseBody = {
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  expiredTime?: string(name='ExpiredTime'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  ipcId?: long(name='IpcId'),
  success?: boolean(name='Success'),
  rtmpUrl?: string(name='RtmpUrl'),
}

model DescribeIpcLiveAddressResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeIpcLiveAddressResponseBody(name='body'),
}

async function describeIpcLiveAddressWithOptions(request: DescribeIpcLiveAddressRequest, runtime: Util.RuntimeOptions): DescribeIpcLiveAddressResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeIpcLiveAddress', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeIpcLiveAddress(request: DescribeIpcLiveAddressRequest): DescribeIpcLiveAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIpcLiveAddressWithOptions(request, runtime);
}

model DescribeOverviewDataRequest {
  date?: string(name='Date'),
  storeIds?: string(name='StoreIds'),
}

model DescribeOverviewDataResponseBody = {
  overviewDetail?: {
    uvEverySqmGrowthWOWPercent?: float(name='UvEverySqmGrowthWOWPercent'),
    uvEverySqm?: float(name='UvEverySqm'),
    stayAvgPeriod?: float(name='StayAvgPeriod'),
    uvWOWPercent?: float(name='UvWOWPercent'),
    uvAvgWOWPercent?: float(name='UvAvgWOWPercent'),
    uvAvg?: float(name='UvAvg'),
    stayDeepAvg?: float(name='StayDeepAvg'),
    stayAvgPeriodWOWPercent?: float(name='StayAvgPeriodWOWPercent'),
    uv?: long(name='Uv'),
    stayDeepAvgWOWPercent?: float(name='StayDeepAvgWOWPercent'),
  }(name='OverviewDetail'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  accurateOverviewDetail?: {
    uvEverySqmGrowthWOWPercent?: string(name='UvEverySqmGrowthWOWPercent'),
    uvEverySqm?: string(name='UvEverySqm'),
    stayAvgPeriod?: string(name='StayAvgPeriod'),
    uvWOWPercent?: string(name='UvWOWPercent'),
    uvAvgWOWPercent?: string(name='UvAvgWOWPercent'),
    uvAvg?: string(name='UvAvg'),
    stayDeepAvg?: string(name='StayDeepAvg'),
    stayAvgPeriodWOWPercent?: string(name='StayAvgPeriodWOWPercent'),
    uv?: long(name='Uv'),
    stayDeepAvgWOWPercent?: string(name='StayDeepAvgWOWPercent'),
  }(name='AccurateOverviewDetail'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model DescribeOverviewDataResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeOverviewDataResponseBody(name='body'),
}

async function describeOverviewDataWithOptions(request: DescribeOverviewDataRequest, runtime: Util.RuntimeOptions): DescribeOverviewDataResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeOverviewData', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeOverviewData(request: DescribeOverviewDataRequest): DescribeOverviewDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOverviewDataWithOptions(request, runtime);
}

model GetFootwearEventRequest {
  storeId?: long(name='StoreId'),
  date?: string(name='Date'),
}

model GetFootwearEventResponseBody = {
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  footwearEventList?: {
    footwearEvent?: [ 
    {
      storeId?: long(name='StoreId'),
      takeEventCount?: int32(name='TakeEventCount'),
      skuId?: string(name='SkuId'),
      date?: string(name='Date'),
      positionNumber?: string(name='PositionNumber'),
      tryOnEventCount?: int32(name='TryOnEventCount'),
    }
  ](name='FootwearEvent')
  }(name='FootwearEventList'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model GetFootwearEventResponse = {
  headers: map[string]string(name='headers'),
  body: GetFootwearEventResponseBody(name='body'),
}

async function getFootwearEventWithOptions(request: GetFootwearEventRequest, runtime: Util.RuntimeOptions): GetFootwearEventResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetFootwearEvent', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getFootwearEvent(request: GetFootwearEventRequest): GetFootwearEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return getFootwearEventWithOptions(request, runtime);
}

model GetFootwearPositionRequest {
  storeId?: long(name='StoreId'),
  date?: string(name='Date'),
  skuId?: string(name='SkuId'),
}

model GetFootwearPositionResponseBody = {
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  storeId?: long(name='StoreId'),
  startTime?: long(name='StartTime'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  skuId?: string(name='SkuId'),
  positionNumber?: int32(name='PositionNumber'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model GetFootwearPositionResponse = {
  headers: map[string]string(name='headers'),
  body: GetFootwearPositionResponseBody(name='body'),
}

async function getFootwearPositionWithOptions(request: GetFootwearPositionRequest, runtime: Util.RuntimeOptions): GetFootwearPositionResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetFootwearPosition', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getFootwearPosition(request: GetFootwearPositionRequest): GetFootwearPositionResponse {
  var runtime = new Util.RuntimeOptions{};
  return getFootwearPositionWithOptions(request, runtime);
}

model ImportSpecialPersonnelRequest {
  description?: string(name='Description'),
  storeIds?: string(name='StoreIds'),
  urls?: string(name='Urls'),
  personType?: string(name='PersonType'),
  ukId?: long(name='UkId'),
  externalId?: string(name='ExternalId'),
  personName?: string(name='PersonName'),
  status?: string(name='Status'),
}

model ImportSpecialPersonnelResponseBody = {
  requestId?: string(name='RequestId'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  specialPersonnelMaps?: {
    specialPersonnelMap?: [ 
    {
      storeId?: long(name='StoreId'),
      ukId?: long(name='UkId'),
    }
  ](name='SpecialPersonnelMap')
  }(name='SpecialPersonnelMaps'),
  success?: boolean(name='Success'),
}

model ImportSpecialPersonnelResponse = {
  headers: map[string]string(name='headers'),
  body: ImportSpecialPersonnelResponseBody(name='body'),
}

async function importSpecialPersonnelWithOptions(request: ImportSpecialPersonnelRequest, runtime: Util.RuntimeOptions): ImportSpecialPersonnelResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ImportSpecialPersonnel', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function importSpecialPersonnel(request: ImportSpecialPersonnelRequest): ImportSpecialPersonnelResponse {
  var runtime = new Util.RuntimeOptions{};
  return importSpecialPersonnelWithOptions(request, runtime);
}

model ListActionDataRequest {
  storeId?: long(name='StoreId'),
  endTime?: long(name='EndTime'),
  pageSize?: int32(name='PageSize'),
  pageNumber?: int32(name='PageNumber'),
  filterInvalidData?: boolean(name='FilterInvalidData'),
  startTime?: long(name='StartTime'),
}

model ListActionDataResponseBody = {
  totalCount?: long(name='TotalCount'),
  requestId?: string(name='RequestId'),
  pageSize?: int32(name='PageSize'),
  pageNumber?: int32(name='PageNumber'),
  actions?: {
    action?: [ 
    {
      status?: int32(name='Status'),
      stayPeriod?: int32(name='StayPeriod'),
      imageUrl?: string(name='ImageUrl'),
      inStay?: long(name='InStay'),
      locationLayerType?: string(name='LocationLayerType'),
      score?: float(name='Score'),
      gmtModified?: long(name='GmtModified'),
      leaveTimestamp?: long(name='LeaveTimestamp'),
      facePointNumber?: int32(name='FacePointNumber'),
      ukId?: long(name='UkId'),
      specialType?: string(name='SpecialType'),
      pointInMap?: {
        y?: float(name='Y'),
        x?: float(name='X'),
      }(name='PointInMap'),
      gender?: string(name='Gender'),
      age?: int32(name='Age'),
      stayValid?: boolean(name='StayValid'),
      storeId?: long(name='StoreId'),
      imageType?: string(name='ImageType'),
      bodyPointNumber?: int32(name='BodyPointNumber'),
      locationId?: long(name='LocationId'),
      objectPositionInImage?: {
        right?: float(name='Right'),
        top?: float(name='Top'),
        left?: float(name='Left'),
        bottom?: float(name='Bottom'),
      }(name='ObjectPositionInImage'),
      gmtCreate?: long(name='GmtCreate'),
      arriveTimestamp?: long(name='ArriveTimestamp'),
      id?: long(name='Id'),
      imageObjectKey?: string(name='ImageObjectKey'),
    }
  ](name='Action')
  }(name='Actions'),
  cursorTime?: long(name='CursorTime'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
}

model ListActionDataResponse = {
  headers: map[string]string(name='headers'),
  body: ListActionDataResponseBody(name='body'),
}

async function listActionDataWithOptions(request: ListActionDataRequest, runtime: Util.RuntimeOptions): ListActionDataResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListActionData', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listActionData(request: ListActionDataRequest): ListActionDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return listActionDataWithOptions(request, runtime);
}

model ListDevicesImagesRequest {
  ipcIdList?: string(name='IpcIdList'),
  storeId?: long(name='StoreId'),
}

model ListDevicesImagesResponseBody = {
  deviceImages?: [ 
    {
      ipcId?: long(name='IpcId'),
      imageUrl?: string(name='ImageUrl'),
    }
  ](name='DeviceImages'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model ListDevicesImagesResponse = {
  headers: map[string]string(name='headers'),
  body: ListDevicesImagesResponseBody(name='body'),
}

async function listDevicesImagesWithOptions(request: ListDevicesImagesRequest, runtime: Util.RuntimeOptions): ListDevicesImagesResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListDevicesImages', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listDevicesImages(request: ListDevicesImagesRequest): ListDevicesImagesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDevicesImagesWithOptions(request, runtime);
}

model ListEmapRequest {
  storeId?: long(name='StoreId'),
}

model ListEmapResponseBody = {
  requestId?: string(name='RequestId'),
  openEmaps?: {
    openEmap?: [ 
    {
      emapId?: string(name='EmapId'),
      locationId?: string(name='LocationId'),
      name?: string(name='Name'),
      emapUrl?: string(name='EmapUrl'),
    }
  ](name='OpenEmap')
  }(name='OpenEmaps'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
}

model ListEmapResponse = {
  headers: map[string]string(name='headers'),
  body: ListEmapResponseBody(name='body'),
}

async function listEmapWithOptions(request: ListEmapRequest, runtime: Util.RuntimeOptions): ListEmapResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListEmap', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listEmap(request: ListEmapRequest): ListEmapResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEmapWithOptions(request, runtime);
}

model ListLocationRequest {
  storeId?: long(name='StoreId'),
}

model ListLocationResponseBody = {
  requestId?: string(name='RequestId'),
  locationInfoItems?: {
    locationInfoItem?: [ 
    {
      parentLocationId?: long(name='ParentLocationId'),
      storeId?: long(name='StoreId'),
      status?: int32(name='Status'),
      locationType?: string(name='LocationType'),
      locationId?: long(name='LocationId'),
      gmtCreate?: long(name='GmtCreate'),
      locationName?: string(name='LocationName'),
      externalId?: string(name='ExternalId'),
      layerType?: string(name='LayerType'),
      gmtModified?: long(name='GmtModified'),
      rectRois?: {
        rectRoi?: [ 
        {
          points?: {
            point?: [ 
            {
              y?: float(name='Y'),
              x?: float(name='X'),
            }
          ](name='Point')
          }(name='Points'),
        }
      ](name='RectRoi')
      }(name='RectRois'),
    }
  ](name='LocationInfoItem')
  }(name='LocationInfoItems'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
}

model ListLocationResponse = {
  headers: map[string]string(name='headers'),
  body: ListLocationResponseBody(name='body'),
}

async function listLocationWithOptions(request: ListLocationRequest, runtime: Util.RuntimeOptions): ListLocationResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListLocation', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listLocation(request: ListLocationRequest): ListLocationResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLocationWithOptions(request, runtime);
}

model ListMaskDetectionResultsRequest {
  endTime?: long(name='EndTime'),
  pageSize?: int32(name='PageSize'),
  startTime?: long(name='StartTime'),
  pageNumber?: int32(name='PageNumber'),
  storeId?: long(name='StoreId'),
}

model ListMaskDetectionResultsResponseBody = {
  totalCount?: long(name='TotalCount'),
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  pageSize?: int32(name='PageSize'),
  pageNumber?: int32(name='PageNumber'),
  maskDetectionResults?: [ 
    {
      pkId?: string(name='PkId'),
      maskResult?: string(name='MaskResult'),
      ipcId?: string(name='IpcId'),
      locationId?: long(name='LocationId'),
      score?: string(name='Score'),
      imageKey?: string(name='ImageKey'),
      id?: long(name='Id'),
    }
  ](name='MaskDetectionResults'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model ListMaskDetectionResultsResponse = {
  headers: map[string]string(name='headers'),
  body: ListMaskDetectionResultsResponseBody(name='body'),
}

async function listMaskDetectionResultsWithOptions(request: ListMaskDetectionResultsRequest, runtime: Util.RuntimeOptions): ListMaskDetectionResultsResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListMaskDetectionResults', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listMaskDetectionResults(request: ListMaskDetectionResultsRequest): ListMaskDetectionResultsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMaskDetectionResultsWithOptions(request, runtime);
}

model ListPersonByImageRequest {
  storeId?: long(name='StoreId'),
  imageUrl?: string(name='ImageUrl'),
}

model ListPersonByImageResponseBody = {
  requestId?: string(name='RequestId'),
  personSearchResultItems?: {
    personSearchResultItem?: [ 
    {
      ukId?: long(name='UkId'),
      score?: float(name='Score'),
    }
  ](name='PersonSearchResultItem')
  }(name='PersonSearchResultItems'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
}

model ListPersonByImageResponse = {
  headers: map[string]string(name='headers'),
  body: ListPersonByImageResponseBody(name='body'),
}

async function listPersonByImageWithOptions(request: ListPersonByImageRequest, runtime: Util.RuntimeOptions): ListPersonByImageResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ListPersonByImage', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listPersonByImage(request: ListPersonByImageRequest): ListPersonByImageResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPersonByImageWithOptions(request, runtime);
}

model ListStoreResponseBody = {
  requestId?: string(name='RequestId'),
  errorCode?: string(name='ErrorCode'),
  stores?: {
    openStore?: [ 
    {
      status?: int32(name='Status'),
      storeId?: long(name='StoreId'),
      openingEndTime?: string(name='OpeningEndTime'),
      storeType?: string(name='StoreType'),
      address?: string(name='Address'),
      sqm?: float(name='Sqm'),
      gmtCreate?: long(name='GmtCreate'),
      gmtModified?: long(name='GmtModified'),
      name?: string(name='Name'),
      openingStartTime?: string(name='OpeningStartTime'),
    }
  ](name='OpenStore')
  }(name='Stores'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
}

model ListStoreResponse = {
  headers: map[string]string(name='headers'),
  body: ListStoreResponseBody(name='body'),
}

async function listStoreWithOptions(runtime: Util.RuntimeOptions): ListStoreResponse {
  var req = new OpenApi.OpenApiRequest{};
  return doRPCRequest('ListStore', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function listStore(): ListStoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return listStoreWithOptions(runtime);
}

model PullActionDataRequest {
  partitionIndex?: int32(name='PartitionIndex'),
  storeId?: long(name='StoreId'),
  startMessageId?: long(name='StartMessageId'),
  endMessageId?: long(name='EndMessageId'),
  limit?: int32(name='Limit'),
}

model PullActionDataResponseBody = {
  requestId?: string(name='RequestId'),
  message?: string(name='Message'),
  nextMessageId?: long(name='NextMessageId'),
  actions?: {
    action?: [ 
    {
      status?: int32(name='Status'),
      stayPeriod?: int32(name='StayPeriod'),
      imageUrl?: string(name='ImageUrl'),
      inStay?: long(name='InStay'),
      locationLayerType?: string(name='LocationLayerType'),
      score?: float(name='Score'),
      gmtModified?: long(name='GmtModified'),
      leaveTimestamp?: long(name='LeaveTimestamp'),
      facePointNumber?: int32(name='FacePointNumber'),
      ukId?: long(name='UkId'),
      specialType?: string(name='SpecialType'),
      pointInMap?: {
        y?: float(name='Y'),
        x?: float(name='X'),
      }(name='PointInMap'),
      gender?: string(name='Gender'),
      age?: int32(name='Age'),
      stayValid?: boolean(name='StayValid'),
      storeId?: long(name='StoreId'),
      imageType?: string(name='ImageType'),
      bodyPointNumber?: int32(name='BodyPointNumber'),
      locationId?: long(name='LocationId'),
      objectPositionInImage?: {
        right?: float(name='Right'),
        top?: float(name='Top'),
        left?: float(name='Left'),
        bottom?: float(name='Bottom'),
      }(name='ObjectPositionInImage'),
      gmtCreate?: long(name='GmtCreate'),
      arriveTimestamp?: long(name='ArriveTimestamp'),
      id?: long(name='Id'),
      imageObjectKey?: string(name='ImageObjectKey'),
    }
  ](name='Action')
  }(name='Actions'),
  partitionIndex?: int32(name='PartitionIndex'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorMessage?: string(name='ErrorMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model PullActionDataResponse = {
  headers: map[string]string(name='headers'),
  body: PullActionDataResponseBody(name='body'),
}

async function pullActionDataWithOptions(request: PullActionDataRequest, runtime: Util.RuntimeOptions): PullActionDataResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('PullActionData', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function pullActionData(request: PullActionDataRequest): PullActionDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return pullActionDataWithOptions(request, runtime);
}

model PullTakeShoesEventRequest {
  storeId?: long(name='StoreId'),
  date?: string(name='Date'),
  skuId?: string(name='SkuId'),
}

model PullTakeShoesEventResponseBody = {
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  storeId?: long(name='StoreId'),
  startTime?: long(name='StartTime'),
  takeShoesEventCount?: int32(name='TakeShoesEventCount'),
  dynamicCode?: string(name='DynamicCode'),
  dynamicMessage?: string(name='DynamicMessage'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  skuId?: string(name='SkuId'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
}

model PullTakeShoesEventResponse = {
  headers: map[string]string(name='headers'),
  body: PullTakeShoesEventResponseBody(name='body'),
}

async function pullTakeShoesEventWithOptions(request: PullTakeShoesEventRequest, runtime: Util.RuntimeOptions): PullTakeShoesEventResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('PullTakeShoesEvent', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function pullTakeShoesEvent(request: PullTakeShoesEventRequest): PullTakeShoesEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return pullTakeShoesEventWithOptions(request, runtime);
}

model PullTryOnShoesEventRequest {
  skuId?: string(name='SkuId'),
  pageSize?: int32(name='PageSize'),
  pageNumber?: int32(name='PageNumber'),
  date?: string(name='Date'),
  storeId?: long(name='StoreId'),
  name?: string(name='Name'),
}

model PullTryOnShoesEventResponseBody = {
  startTs?: long(name='StartTs'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  pageSize?: int32(name='PageSize'),
  dynamicMessage?: string(name='DynamicMessage'),
  code?: string(name='Code'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
  storeId?: long(name='StoreId'),
  tryOnShoesEventCount?: int32(name='TryOnShoesEventCount'),
  pageNumber?: int32(name='PageNumber'),
  dynamicCode?: string(name='DynamicCode'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  skuId?: string(name='SkuId'),
}

model PullTryOnShoesEventResponse = {
  headers: map[string]string(name='headers'),
  body: PullTryOnShoesEventResponseBody(name='body'),
}

async function pullTryOnShoesEventWithOptions(request: PullTryOnShoesEventRequest, runtime: Util.RuntimeOptions): PullTryOnShoesEventResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('PullTryOnShoesEvent', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function pullTryOnShoesEvent(request: PullTryOnShoesEventRequest): PullTryOnShoesEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return pullTryOnShoesEventWithOptions(request, runtime);
}

model ReportPacketRequest {
  packetCount?: long(name='PacketCount'),
  deviceId?: string(name='DeviceId'),
  storeId?: long(name='StoreId'),
  packetContent?: [ 
    {
      version?: string(name='Version'),
      content?: string(name='Content'),
    }
  ](name='PacketContent'),
}

model ReportPacketResponseBody = {
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  errorCode?: string(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  success?: boolean(name='Success'),
}

model ReportPacketResponse = {
  headers: map[string]string(name='headers'),
  body: ReportPacketResponseBody(name='body'),
}

async function reportPacketWithOptions(request: ReportPacketRequest, runtime: Util.RuntimeOptions): ReportPacketResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('ReportPacket', '2020-10-30', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function reportPacket(request: ReportPacketRequest): ReportPacketResponse {
  var runtime = new Util.RuntimeOptions{};
  return reportPacketWithOptions(request, runtime);
}

